package design.pattern.singleton;

/**
 * 饿汉式
 */
public class Singleton {


	public static void main(String[] args) {
		Singleton.getInstance();
	}

	private Singleton(){
		System.out.println("Singleton is create");	
	}

	static class StaticSigleton{
		public static Singleton singleton = new Singleton();

	}

	public static Singleton getInstance() {
		return StaticSigleton.singleton;
	}

	public static void print(){
		System.out.println("11111");
	}
}
